#/usr/bin/env python

#mainline comment 2
#mainline comment
#####################################################################
# ChessBoard v2.05 is created by John Eriksson - http://arainyday.se
# It's released under the Gnu Public Licence (GPL)
# Have fun!
#####################################################################

#test branch comment.
from ChessConsts import ChessConsts

class ChessCommonUtils:

    @staticmethod
    def isFree(board,x,y):
        return board[y][x] == '.' 
    
    @staticmethod
    def getColor(board,x,y):
        if board[y][x] == '.':
            return ChessConsts.NOCOLOR
        elif board[y][x].isupper():
            return ChessConsts.WHITE
        elif board[y][x].islower():
            return ChessConsts.BLACK
    
